
package results;

import objects.Station;

/**
 * Monitors the state during the communication
 * 
 * @author Guillaume
 * @created June 8, 2004
 */

public class ProbeComState extends ProbeCom {

	/** Property name monitored by the probe */
	private static final String PROPERTY_NAME = "ProbeComState";

	/** Probe description */
	private static final String PROBE_DESCRIPTION = "";
	

	/**
	 * @param t
	 * @param probeName probe name
	 */
	public ProbeComState(Station t, String probeName) {
		super(COM_LOOP,t,probeName);
	}
	
	/**
	 * Get the communication state of the station.
	 * The possible state are :
	 * <ul>
	 * <li><code>ASLEEP   </code> = 0</li>
	 * <li><code>WAITING  </code> = 1</li>
	 * <li><code>LISTENING</code> = 2</li>
	 * <li><code>SPEAKING </code> = 3</li>
	 * <li><code>GROUNDTRANSMITTING</code> = 4</li>
	 * </ul>
	 * These are declared in <code>Objects.Station</code>
	 * 
	 * @see Objects.Station
	 * @see Results.Probe#getValue()
	 */
	protected Object getValue() {
		return new Integer(((Station) _linkedStation).getState());
	}
	
	/**
	 * Get the property Name
	 * @return property name
	 * @see Results.Probe#getPropertyName()
	 */
	public String getPropertyName() {
		return PROPERTY_NAME;
	}

	/**
	 * Get the descitption of the probe
	 * @return probe description
	 * @see Results.Probe#getProbeDescription()
	 */
	public String getProbeDescription() {
		return PROBE_DESCRIPTION;
	}

	public static void main(String[] args) {
	}
}
